//
//  phoneGetSMSImageRequest.m
//  TestGizWits
//
//  Created by JM on 15/11/17.
//  Copyright © 2015年 JM. All rights reserved.
//

#import "PhoneGetSMSImageRequest.h"

@implementation PhoneGetSMSImageRequest
- (void)didRealRequest {
     [[XPGWifiSDK sharedInstance] getCaptchaCode:self.DY_appSecret];
}

//使用获取图片验证码事件
- (void)wifiSDK:(XPGWifiSDK *)wifiSDK didGetCaptchaCode:(NSError *)result token:(NSString *)token captchaId:(NSString *)captchaId captchaURL:(NSString *)captchaURL
{
    if(result.code == XPGWifiError_NONE) {
        PhoneGetSMSImageResponse* response = [PhoneGetSMSImageResponse response];
        response.DY_wifiSDK = wifiSDK;
        response.DY_token = token;
        response.DY_captchaURL  = captchaURL;
        response.DY_captchaId = captchaId;
        self.block(response,nil);
        //获取手机验证码成功
    }
    else
    {
        self.block(nil,result);
        //获取手机验证码失败
    }
    [super superHandelResponse];
}

@end

@implementation  PhoneGetSMSImageResponse

@end
